1. Field of the Invention
The present invention relates to an image detection apparatus, and in particular, to an image detection apparatus for a position of a target such as, for example, a signboard, a marking or a traffic signal, in a color image captured by a camera or the like mounted on a moving body, a program for realizing such image detection, and a recording medium storing such a program.
2. Description of the Related Art
A conventionally known image recognition apparatus for recognizing a position of a traffic sign in a color image captured by a camera or the like mounted on a moving body is described in Japanese Publication for Opposition No. 6-52554.
The image recognition apparatus described in Japanese Publication for Opposition No. 6-52554 includes a color imaging section for capturing a color image of a scene in front of a moving body, a feature extraction section for selecting images having a first color and a second color in the obtained color image and extracting the image in the form of binarized image data, an image memory for storing the extracted binarized image data, a reference memory for storing, in advance, a frame pattern having the first color of an image to be detected and a character shape pattern having the second color of the image to be detected, a frame recognition section for comparing the binarized image data stored in the image memory and the frame pattern stored in the reference memory so as to recognize the presence of a frame of a traffic sign, and an in-frame pattern recognition section for recognizing the character shape pattern inside the frame of the traffic sign.
Operation of the above-described conventional image recognition apparatus will be described.
FIG. 19 is a flowchart illustrating an image recognition process performed by the conventional image recognition apparatus.
Step 1901: An image in front of the moving body is captured by the color imaging section and then is converted into digital image data. Each pixel of the digital image data has a digital value representing each of three primary colors, red (R), green (G) and blue (B).
Step 1902: The feature extraction section extracts, from the digital image data, digital binarized image data in which a first color (red for the frame of the traffic sign) and a second color (blue for the characters of the traffic sign) are emphasized. More specifically, only the red pixels and blue pixels are extracted from the digital image data. The extracted binarized image data is stored in the image memory. For example, if the value of R is higher than the value of G and the value of B (i.e., R>G and R>B) in a pixel, that pixel is determined as a red pixel. If the value of G is higher than the value of R and the value of B (i.e., G>R and G>B) in another pixel, that pixel is determined as a green pixel.
Step 1903: The frame recognition section compares reference data representing a frame pattern having the first color of the traffic sign stored in advance in the reference memory with the binarized image data stored in the image memory, for each scanning line.
Step 1904: It is determined whether or not the extracted binarized image data matches the reference data representing the frame pattern stored in the reference memory. When it is determined that the extracted binarized image data does not match the reference data in step 1904, operation returns to step 1901, and the next image is captured. When it is determined that the extracted binarized image data matches the reference data in step 1904, operation advances to step 1905.
Step 1905: The in-frame pattern recognition section recognizes a portion of the extracted binarized image data which corresponds to the inside of the frame of the traffic sign which was detected in step 1904, using the character shape pattern data stored in the reference memory.
Step 1906: It is determined whether or not a character shape pattern matching the binarized image data representing the portion inside the frame of the traffic sign is present in the reference memory. When it is determined that the character shape pattern matching the binarized image data representing the portion inside the frame is not present in the reference memory in step 1906, operation returns to step 1901 and the next image is captured. When it is determined that the character shape pattern matching the binarized image data representing the portion inside the frame is present in the reference memory in step 1906, operation advances to step 1907.
Step 1907: The contents of the character shape pattern matching the binarized image data representing the portion inside the frame is notified to the driver of the moving body.
The above-described conventional image recognition apparatus cannot detect a target other than traffic signs for the following reasons.
(1) Each pixel is represented by three values of R (red), G (green) and B (blue), and the color having the highest value among the three is determined as the color of the pixel. Therefore, it is difficult to detect a target having a color other than red, green or blue.
(2) When the target does not have a frame (or when the frame is of a color which is difficult to detect, for example, white), the frame recognition section cannot recognize the frame and thus cannot specify the position of a portion having the second color.
(3) The conventional image recognition apparatus is limited to the use of two colors of the first color and the second color. The image recognition apparatus is not assumed to be used to detect a signboard including any other number of colors, such as a signboard of a gas station, a convenience store or the like.
The conventional image recognition apparatus cannot possibly improve detection precision for the following reasons.
(1) The frame recognition section cannot extract a frame pattern having a different size from that of the frame pattern having a first color stored in the reference memory. In other words, the frame recognition section cannot deal with a change in scale.
(2) Since the frame and a portion inside the frame are separately recognized, the precise positional relationship of the frame and the portion inside the frame is not considered. The recognition capability needs to be further improved.
(3) District-by-district environmental differences are not considered. For example, a signboard of a branch of a “chain” store in Kyoto, Japan has a color matching the scenery and thus is different from a signboard of a branch of the same chain in another city. When a moving body on which the conventional image recognition apparatus is mounted moves from Kyoto to Osaka, Japan the signboard in both cities cannot be detected.
The conventional image recognition apparatus cannot possibly improve detection speed for the following reasons.
(1) For detecting a frame pattern of a first color, the image recognition apparatus checks each scanning line in the entire area of the image. Such an operation is time-consuming.
(2) For detecting a target from images continuously input, the image recognition apparatus always processes the entire input image without considering the detection results of the images input in the past. Such an operation is also time-consuming.